def check_pwd(pwd):
    """

    :param pwd: 传入密码，检查是否符合要求
    :return:  符合要求返回True，否则返回False
    """
    if len(pwd) <= 8:
        return True
    else:
        a = b = c = d = 0
        for i in pwd:
            if i.isupper():
                a = 1
            elif i.islower():
                b = 1
            elif i.isdigit():
                c = 1
            else:
                d = 1
        if a + b + c + d >= 3:
            return True
        else:
            return False

def check_usr_len(usr):
    if 6 <= len(usr) <= 20:
        return True
    else:
        return False